<?
global $table_Prefix;
//设置需要搜索的表格的前缀后缀
$table_Suffix="login_admin";
$table=$table_Prefix.$table_Suffix;
//设置需要搜索的表格的前缀后缀


//设置需要搜索的表格的排序项和升降项
$sort_by = "nid";
$sort_order = "desc";
//设置需要搜索的表格的排序项和升降项
?>


<?


if($_REQUEST ['nid'])
{
	$trans_nid = $_REQUEST ['nid']; 
	
	}
else
{
$check_name=$_SESSION['username'] ;

$result = mysql_query("select * from $table where name = '$check_name' ");
	
while($row = mysql_fetch_array($result))
  {
  $new_admin_nid=$row['nid'];
  $new_admin_type_now=$row['admin_term'];
  $new_admin_password=$row['admin_password'];
  }  
  $trans_nid=$new_admin_nid;
}



//此处开始改变传递的值，判断未编辑的话，就把trans值转换为当前用户nid。
//不在之前连接处传递，是为了安全性考虑。不曝露其他账户的修改权限

 
$result = mysql_query("SELECT * FROM $table where nid = '$trans_nid'");

while($row = mysql_fetch_array($result))
  {
  $detail_nid=$row['nid'];
  $detail_name=$row['name'];
  $detail_introduce=$row['introduce'];
  $detail_icon=$row['icon'];
  $detail_term=$row['admin_term'];
  }

mysql_close($con);
?>



<?
global $table_Prefix;
//设置需要搜索的表格的前缀后缀
$table_Suffix = "login_admin_term";
$table = $table_Prefix . $table_Suffix;
//设置需要搜索的表格的前缀后缀

//设置需要搜索的表格的排序项和升降项
$sort_by = "nid";
$sort_order = "desc";
//设置需要搜索的表格的排序项和升
?>

<?php

$result = mysql_query("select * from $table where interm='root' and nid='$detail_term'");

while ($row = mysql_fetch_array($result)) {
    $term_name = $row['name'];
}
mysql_close($con);
?>


